import { PropsWithChildren } from 'react'
import { SizeType } from './index'
import React from 'react'

export interface ConfigContextType {
  space?: {
    size?: SizeType
  }
}
interface ConfigProviderProps extends PropsWithChildren<ConfigContextType> {}
export const ConfigContext = React.createContext<ConfigContextType>({})

export const ConfigProvider: React.FC<ConfigProviderProps> = (props) => {
  const { space, children } = props
  return (
    <ConfigContext.Provider value={{ space }}>
      {children}
    </ConfigContext.Provider>
  )
}
